import request from '@/utils/request'



// 查询轮播图列表

export function listCarousel(query) {
    return request({
        url: 'index/carousel/list',
        method: 'get',
        params: query
    })
}
// 查询企业文化列表
export function listIntroduce(query) {
    return request({
        url: 'index/introduce/list',
        method: 'get',
        params: query
    })
}
// 查询年卡阵地列表
export function listAnnualPass(query) {
    return request({
        url: '/index/annualPass/list',
        method: 'get',
        params: query
    })
}
// 查询年卡阵地详细
export function getAnnualPass(query) {
    return request({
        url: '/index/annualPass/' + query.id,
        method: 'get',
        params: query
    })
}
// 查询企业人员列表
export function listPersonnel(query) {
    return request({
        url: '/index/personnel/list',
        method: 'get',
        params: query
    })
}
// 查询企业人员详细
export function getPersonnel(id) {
    return request({
        url: '/index/personnel/' + id,
        method: 'get'
    })
}
// 查询公告/新闻资讯列表
export function listAnnouncement(query) {
    return request({
        url: '/index/announcement/list',
        method: 'get',
        params: query
    })
}
// 查询公告/新闻资讯详细
export function getAnnouncement(id) {
    return request({
        url: '/index/announcement/' + id,
        method: 'get'
    })
}
// 查询留言咨询列表
export function listMessage(query) {
    return request({
        url: '/index/message/list',
        method: 'get',
        params: query
    })
}
// 新增留言咨询
export function addMessage(data) {
    return request({
        url: '/index/message',
        method: 'post',
        data: data
    })
}
// 查询活动列表
export function listActivity(query) {
    return request({
        url: '/index/activity/list',
        method: 'get',
        params: query
    })
}
// 查询视频列表
export function listVideo(query) {
    return request({
        url: '/index/video/list',
        method: 'get',
        params: query
    })
}
// 查询门票列表
export function listTicket(query) {
    return request({
        url: '/index/ticket/list',
        method: 'get',
        params: query
    })
}
// 查询门票详细
export function getTicket(id) {
    return request({
        url: '/index/ticket/' + id,
        method: 'get'
    })
}
// 查询商品列表
export function listCulturalRelic(query) {
    return request({
        url: '/index/culturalRelic/list',
        method: 'get',
        params: query
    })
}

export function listFood(query) {
    return request({
        url: '/index/food/list',
        method: 'get',
        params: query
    })
}


// 查询文物详细
export function getFoodDetail(id) {
    return request({
        url: '/index/food/' + id,
        method: 'get'
    })
}

// 查询文物详细
export function getCulturalRelic(id) {
    return request({
        url: '/index/culturalRelic/' + id,
        method: 'get'
    })
}
// 修改文物/美食
// export function updateCulturalRelic(data) {
//     return request({
//         url: '/index/culturalRelic',
//         method: 'put',
//         data: data
//     })
// }
// 查询景区列表
export function listPlace(query) {
    return request({
        url: '/index/place/list',
        method: 'get',
        params: query
    })
}
// 查询景区详细
export function getPlace(id) {
    return request({
        url: '/index/place/' + id,
        method: 'get'
    })
}
// 查询活动详细
export function getActivity(id) {
    return request({
        url: '/index/activity/' + id,
        method: 'get'
    })
}
// 查询联动图片列表
export function listTurnOver(query) {
    return request({
        url: '/index/turnOver/list',
        method: 'get',
        params: query
    })
}
// 查询视频详细
export function getVideo(id) {
    return request({
        url: '/index/video/' + id,
        method: 'get'
    })
}
// 点赞(文物/美食)
export function getLikes(id) {
    return request({
        url: '/index/culturalRelic/thumbsUp/' + id,
        method: 'get'
    })
}
// 点赞(票)
export function gettickLikes(id) {
    return request({
        url: '/index/ticket/thumbsUp/' + id,
        method: 'get'
    })
}

// 查当天最新创建的一条明信片
export function getPostcardLastone() {
    return request({
        url: '/index/postcard/getOne',
        method: 'get'
    })
}
